package cn.com.dhcc.turbo.service.exch;

import org.apache.http.HttpRequest;

import cn.com.dhcc.app.core.exception.ServiceException;


/**
 * 通过api接口调用的客户端验证接口
 * @author qiao
 * @2015-1-7 @下午5:58:29
 */
public interface ApiUserAuthService {

	/**
	 * ftp登陆验证
	 * @param adapterCode
	 * @param authCode
	 * @return
	 */
	public boolean isAdapterAuthCodeOkForFtp(FtpApiUserInfo ftpApiUserInfo);
	
	/**
	 * webservice调用验证    
	 * @param adapterCode
	 * @param authCode
	 * @return
	 * @deprecated use {@link #isAdapterAuthCodeOkForHttp(HttpRequest)}
	 */
	public boolean isAdapterAuthCodeOkForWebservice(WebServiceClientUserInfo webServiceClientUserInfo);
	/**
	 * http调用验证
	 * @param adapterCode
	 * @param authCode
	 * @return
	 */
	public boolean isAdapterAuthCodeOkForHttp(HttpClientUserInfo request);
	/**
	 * 生成授权码
	 * @param adapter
	 * @param ip
	 * @return
	 */
	public String createAuthCode(String adapter, String ip) throws ServiceException  ;
}
